/**
 * This is a generated class and is not intended for modification.  To customize behavior
 * of this value object you may modify the generated sub-class of this class - VoDeliveryOrder.as.
 */

package com.model.valueObjects
{
import com.adobe.fiber.services.IFiberManagingService;
import com.adobe.fiber.util.FiberUtils;
import com.adobe.fiber.valueobjects.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import mx.binding.utils.ChangeWatcher;
import mx.collections.ArrayCollection;
import mx.events.CollectionEvent;
import mx.events.PropertyChangeEvent;
import mx.validators.ValidationResult;

import flash.net.registerClassAlias;
import flash.net.getClassByAlias;
import com.adobe.fiber.core.model_internal;
import com.adobe.fiber.valueobjects.IPropertyIterator;
import com.adobe.fiber.valueobjects.AvailablePropertyIterator;

use namespace model_internal;

[ExcludeClass]
public class _Super_VoDeliveryOrder extends flash.events.EventDispatcher implements com.adobe.fiber.valueobjects.IValueObject
{
    model_internal static function initRemoteClassAliasSingle(cz:Class) : void
    {
        try
        {
            if (flash.net.getClassByAlias("VoDeliveryOrder") == null)
            {
                flash.net.registerClassAlias("VoDeliveryOrder", cz);
            }
        }
        catch (e:Error)
        {
            flash.net.registerClassAlias("VoDeliveryOrder", cz);
        }
    }

    model_internal static function initRemoteClassAliasAllRelated() : void
    {
    }

    model_internal var _dminternal_model : _VoDeliveryOrderEntityMetadata;

    /**
     * properties
     */
    private var _internal_pro_name : ArrayCollection;
    private var _internal_total_qty : int;
    private var _internal_is_invoiced : int;
    private var _internal_cre_userid_fk : int;
    private var _internal_part_number : ArrayCollection;
    private var _internal_serialnumber : int;
    private var _internal_delivery_order_date : String;
    private var _internal_pro_description : ArrayCollection;
    private var _internal_do_remarks : String;
    private var _internal_sc_detserialnumber_fk : ArrayCollection;
    private var _internal_activestatus : Boolean;
    private var _internal_client_name : String;
    private var _internal_po_detserialnumber : ArrayCollection;
    private var _internal_cre_datetime : String;
    private var _internal_sc_qty : ArrayCollection;
    private var _internal_sc_serialnumber : ArrayCollection;
    private var _internal_pro_serialnumber_fk : ArrayCollection;
    private var _internal_delivered_qty : ArrayCollection;
    private var _internal_reserved_qty : ArrayCollection;
    private var _internal_delivery_order_code : String;
    private var _internal_do_detserialnumber : ArrayCollection;
    private var _internal_sales_con_code : ArrayCollection;
    private var _internal_customer_serialnumber_fk : int;
    private var _internal_delivery_order_fk : ArrayCollection;
    private var _internal_warehouse_serialnumber_fk : ArrayCollection;

    private static var emptyArray:Array = new Array();


    /**
     * derived property cache initialization
     */
    model_internal var _cacheInitialized_isValid:Boolean = false;

    model_internal var _changeWatcherArray:Array = new Array();

    public function _Super_VoDeliveryOrder()
    {
        _model = new _VoDeliveryOrderEntityMetadata(this);

        // Bind to own data properties for cache invalidation triggering
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_name", model_internal::setterListenerPro_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "part_number", model_internal::setterListenerPart_number));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "delivery_order_date", model_internal::setterListenerDelivery_order_date));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_description", model_internal::setterListenerPro_description));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "do_remarks", model_internal::setterListenerDo_remarks));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sc_detserialnumber_fk", model_internal::setterListenerSc_detserialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "client_name", model_internal::setterListenerClient_name));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "po_detserialnumber", model_internal::setterListenerPo_detserialnumber));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "cre_datetime", model_internal::setterListenerCre_datetime));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sc_qty", model_internal::setterListenerSc_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sc_serialnumber", model_internal::setterListenerSc_serialnumber));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "pro_serialnumber_fk", model_internal::setterListenerPro_serialnumber_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "delivered_qty", model_internal::setterListenerDelivered_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "reserved_qty", model_internal::setterListenerReserved_qty));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "delivery_order_code", model_internal::setterListenerDelivery_order_code));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "do_detserialnumber", model_internal::setterListenerDo_detserialnumber));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "sales_con_code", model_internal::setterListenerSales_con_code));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "delivery_order_fk", model_internal::setterListenerDelivery_order_fk));
        model_internal::_changeWatcherArray.push(mx.binding.utils.ChangeWatcher.watch(this, "warehouse_serialnumber_fk", model_internal::setterListenerWarehouse_serialnumber_fk));

    }

    /**
     * data property getters
     */

    [Bindable(event="propertyChange")]
    public function get pro_name() : ArrayCollection
    {
        return _internal_pro_name;
    }

    [Bindable(event="propertyChange")]
    public function get total_qty() : int
    {
        return _internal_total_qty;
    }

    [Bindable(event="propertyChange")]
    public function get is_invoiced() : int
    {
        return _internal_is_invoiced;
    }

    [Bindable(event="propertyChange")]
    public function get cre_userid_fk() : int
    {
        return _internal_cre_userid_fk;
    }

    [Bindable(event="propertyChange")]
    public function get part_number() : ArrayCollection
    {
        return _internal_part_number;
    }

    [Bindable(event="propertyChange")]
    public function get serialnumber() : int
    {
        return _internal_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get delivery_order_date() : String
    {
        return _internal_delivery_order_date;
    }

    [Bindable(event="propertyChange")]
    public function get pro_description() : ArrayCollection
    {
        return _internal_pro_description;
    }

    [Bindable(event="propertyChange")]
    public function get do_remarks() : String
    {
        return _internal_do_remarks;
    }

    [Bindable(event="propertyChange")]
    public function get sc_detserialnumber_fk() : ArrayCollection
    {
        return _internal_sc_detserialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get activestatus() : Boolean
    {
        return _internal_activestatus;
    }

    [Bindable(event="propertyChange")]
    public function get client_name() : String
    {
        return _internal_client_name;
    }

    [Bindable(event="propertyChange")]
    public function get po_detserialnumber() : ArrayCollection
    {
        return _internal_po_detserialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get cre_datetime() : String
    {
        return _internal_cre_datetime;
    }

    [Bindable(event="propertyChange")]
    public function get sc_qty() : ArrayCollection
    {
        return _internal_sc_qty;
    }

    [Bindable(event="propertyChange")]
    public function get sc_serialnumber() : ArrayCollection
    {
        return _internal_sc_serialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get pro_serialnumber_fk() : ArrayCollection
    {
        return _internal_pro_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get delivered_qty() : ArrayCollection
    {
        return _internal_delivered_qty;
    }

    [Bindable(event="propertyChange")]
    public function get reserved_qty() : ArrayCollection
    {
        return _internal_reserved_qty;
    }

    [Bindable(event="propertyChange")]
    public function get delivery_order_code() : String
    {
        return _internal_delivery_order_code;
    }

    [Bindable(event="propertyChange")]
    public function get do_detserialnumber() : ArrayCollection
    {
        return _internal_do_detserialnumber;
    }

    [Bindable(event="propertyChange")]
    public function get sales_con_code() : ArrayCollection
    {
        return _internal_sales_con_code;
    }

    [Bindable(event="propertyChange")]
    public function get customer_serialnumber_fk() : int
    {
        return _internal_customer_serialnumber_fk;
    }

    [Bindable(event="propertyChange")]
    public function get delivery_order_fk() : ArrayCollection
    {
        return _internal_delivery_order_fk;
    }

    [Bindable(event="propertyChange")]
    public function get warehouse_serialnumber_fk() : ArrayCollection
    {
        return _internal_warehouse_serialnumber_fk;
    }

    /**
     * data property setters
     */

    public function set pro_name(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_name;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_name = value;
            }
            else if (value is Array)
            {
                _internal_pro_name = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_name must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_name", oldValue, _internal_pro_name));
        }
    }

    public function set total_qty(value:int) : void
    {
        var oldValue:int = _internal_total_qty;
        if (oldValue !== value)
        {
            _internal_total_qty = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "total_qty", oldValue, _internal_total_qty));
        }
    }

    public function set is_invoiced(value:int) : void
    {
        var oldValue:int = _internal_is_invoiced;
        if (oldValue !== value)
        {
            _internal_is_invoiced = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "is_invoiced", oldValue, _internal_is_invoiced));
        }
    }

    public function set cre_userid_fk(value:int) : void
    {
        var oldValue:int = _internal_cre_userid_fk;
        if (oldValue !== value)
        {
            _internal_cre_userid_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_userid_fk", oldValue, _internal_cre_userid_fk));
        }
    }

    public function set part_number(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_part_number;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_part_number = value;
            }
            else if (value is Array)
            {
                _internal_part_number = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of part_number must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "part_number", oldValue, _internal_part_number));
        }
    }

    public function set serialnumber(value:int) : void
    {
        var oldValue:int = _internal_serialnumber;
        if (oldValue !== value)
        {
            _internal_serialnumber = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "serialnumber", oldValue, _internal_serialnumber));
        }
    }

    public function set delivery_order_date(value:String) : void
    {
        var oldValue:String = _internal_delivery_order_date;
        if (oldValue !== value)
        {
            _internal_delivery_order_date = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_order_date", oldValue, _internal_delivery_order_date));
        }
    }

    public function set pro_description(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_description;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_description = value;
            }
            else if (value is Array)
            {
                _internal_pro_description = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_description must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_description", oldValue, _internal_pro_description));
        }
    }

    public function set do_remarks(value:String) : void
    {
        var oldValue:String = _internal_do_remarks;
        if (oldValue !== value)
        {
            _internal_do_remarks = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "do_remarks", oldValue, _internal_do_remarks));
        }
    }

    public function set sc_detserialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sc_detserialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sc_detserialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_sc_detserialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sc_detserialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_detserialnumber_fk", oldValue, _internal_sc_detserialnumber_fk));
        }
    }

    public function set activestatus(value:Boolean) : void
    {
        var oldValue:Boolean = _internal_activestatus;
        if (oldValue !== value)
        {
            _internal_activestatus = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "activestatus", oldValue, _internal_activestatus));
        }
    }

    public function set client_name(value:String) : void
    {
        var oldValue:String = _internal_client_name;
        if (oldValue !== value)
        {
            _internal_client_name = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "client_name", oldValue, _internal_client_name));
        }
    }

    public function set po_detserialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_po_detserialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_po_detserialnumber = value;
            }
            else if (value is Array)
            {
                _internal_po_detserialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of po_detserialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "po_detserialnumber", oldValue, _internal_po_detserialnumber));
        }
    }

    public function set cre_datetime(value:String) : void
    {
        var oldValue:String = _internal_cre_datetime;
        if (oldValue !== value)
        {
            _internal_cre_datetime = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "cre_datetime", oldValue, _internal_cre_datetime));
        }
    }

    public function set sc_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sc_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sc_qty = value;
            }
            else if (value is Array)
            {
                _internal_sc_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sc_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_qty", oldValue, _internal_sc_qty));
        }
    }

    public function set sc_serialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sc_serialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sc_serialnumber = value;
            }
            else if (value is Array)
            {
                _internal_sc_serialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sc_serialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sc_serialnumber", oldValue, _internal_sc_serialnumber));
        }
    }

    public function set pro_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_pro_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_pro_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_pro_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of pro_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "pro_serialnumber_fk", oldValue, _internal_pro_serialnumber_fk));
        }
    }

    public function set delivered_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_delivered_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_delivered_qty = value;
            }
            else if (value is Array)
            {
                _internal_delivered_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of delivered_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivered_qty", oldValue, _internal_delivered_qty));
        }
    }

    public function set reserved_qty(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_reserved_qty;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_reserved_qty = value;
            }
            else if (value is Array)
            {
                _internal_reserved_qty = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of reserved_qty must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "reserved_qty", oldValue, _internal_reserved_qty));
        }
    }

    public function set delivery_order_code(value:String) : void
    {
        var oldValue:String = _internal_delivery_order_code;
        if (oldValue !== value)
        {
            _internal_delivery_order_code = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_order_code", oldValue, _internal_delivery_order_code));
        }
    }

    public function set do_detserialnumber(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_do_detserialnumber;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_do_detserialnumber = value;
            }
            else if (value is Array)
            {
                _internal_do_detserialnumber = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of do_detserialnumber must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "do_detserialnumber", oldValue, _internal_do_detserialnumber));
        }
    }

    public function set sales_con_code(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_sales_con_code;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_sales_con_code = value;
            }
            else if (value is Array)
            {
                _internal_sales_con_code = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of sales_con_code must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "sales_con_code", oldValue, _internal_sales_con_code));
        }
    }

    public function set customer_serialnumber_fk(value:int) : void
    {
        var oldValue:int = _internal_customer_serialnumber_fk;
        if (oldValue !== value)
        {
            _internal_customer_serialnumber_fk = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "customer_serialnumber_fk", oldValue, _internal_customer_serialnumber_fk));
        }
    }

    public function set delivery_order_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_delivery_order_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_delivery_order_fk = value;
            }
            else if (value is Array)
            {
                _internal_delivery_order_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of delivery_order_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "delivery_order_fk", oldValue, _internal_delivery_order_fk));
        }
    }

    public function set warehouse_serialnumber_fk(value:*) : void
    {
        var oldValue:ArrayCollection = _internal_warehouse_serialnumber_fk;
        if (oldValue !== value)
        {
            if (value is ArrayCollection)
            {
                _internal_warehouse_serialnumber_fk = value;
            }
            else if (value is Array)
            {
                _internal_warehouse_serialnumber_fk = new ArrayCollection(value);
            }
            else
            {
                throw new Error("value of warehouse_serialnumber_fk must be a collection");
            }
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "warehouse_serialnumber_fk", oldValue, _internal_warehouse_serialnumber_fk));
        }
    }

    /**
     * Data property setter listeners
     *
     * Each data property whose value affects other properties or the validity of the entity
     * needs to invalidate all previously calculated artifacts. These include:
     *  - any derived properties or constraints that reference the given data property.
     *  - any availability guards (variant expressions) that reference the given data property.
     *  - any style validations, message tokens or guards that reference the given data property.
     *  - the validity of the property (and the containing entity) if the given data property has a length restriction.
     *  - the validity of the property (and the containing entity) if the given data property is required.
     */

    model_internal function setterListenerPro_name(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_name);
            }
        }
        _model.invalidateDependentOnPro_name();
    }

    model_internal function setterListenerPart_number(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPart_number);
            }
        }
        _model.invalidateDependentOnPart_number();
    }

    model_internal function setterListenerDelivery_order_date(value:flash.events.Event):void
    {
        _model.invalidateDependentOnDelivery_order_date();
    }

    model_internal function setterListenerPro_description(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_description);
            }
        }
        _model.invalidateDependentOnPro_description();
    }

    model_internal function setterListenerDo_remarks(value:flash.events.Event):void
    {
        _model.invalidateDependentOnDo_remarks();
    }

    model_internal function setterListenerSc_detserialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSc_detserialnumber_fk);
            }
        }
        _model.invalidateDependentOnSc_detserialnumber_fk();
    }

    model_internal function setterListenerClient_name(value:flash.events.Event):void
    {
        _model.invalidateDependentOnClient_name();
    }

    model_internal function setterListenerPo_detserialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPo_detserialnumber);
            }
        }
        _model.invalidateDependentOnPo_detserialnumber();
    }

    model_internal function setterListenerCre_datetime(value:flash.events.Event):void
    {
        _model.invalidateDependentOnCre_datetime();
    }

    model_internal function setterListenerSc_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSc_qty);
            }
        }
        _model.invalidateDependentOnSc_qty();
    }

    model_internal function setterListenerSc_serialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSc_serialnumber);
            }
        }
        _model.invalidateDependentOnSc_serialnumber();
    }

    model_internal function setterListenerPro_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerPro_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnPro_serialnumber_fk();
    }

    model_internal function setterListenerDelivered_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerDelivered_qty);
            }
        }
        _model.invalidateDependentOnDelivered_qty();
    }

    model_internal function setterListenerReserved_qty(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerReserved_qty);
            }
        }
        _model.invalidateDependentOnReserved_qty();
    }

    model_internal function setterListenerDelivery_order_code(value:flash.events.Event):void
    {
        _model.invalidateDependentOnDelivery_order_code();
    }

    model_internal function setterListenerDo_detserialnumber(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerDo_detserialnumber);
            }
        }
        _model.invalidateDependentOnDo_detserialnumber();
    }

    model_internal function setterListenerSales_con_code(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerSales_con_code);
            }
        }
        _model.invalidateDependentOnSales_con_code();
    }

    model_internal function setterListenerDelivery_order_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerDelivery_order_fk);
            }
        }
        _model.invalidateDependentOnDelivery_order_fk();
    }

    model_internal function setterListenerWarehouse_serialnumber_fk(value:flash.events.Event):void
    {
        if (value is mx.events.PropertyChangeEvent)
        {
            if (mx.events.PropertyChangeEvent(value).newValue)
            {
                mx.events.PropertyChangeEvent(value).newValue.addEventListener(mx.events.CollectionEvent.COLLECTION_CHANGE, model_internal::setterListenerWarehouse_serialnumber_fk);
            }
        }
        _model.invalidateDependentOnWarehouse_serialnumber_fk();
    }


    /**
     * valid related derived properties
     */
    model_internal var _isValid : Boolean;
    model_internal var _invalidConstraints:Array = new Array();
    model_internal var _validationFailureMessages:Array = new Array();

    /**
     * derived property calculators
     */

    /**
     * isValid calculator
     */
    model_internal function calculateIsValid():Boolean
    {
        var violatedConsts:Array = new Array();
        var validationFailureMessages:Array = new Array();

        var propertyValidity:Boolean = true;
        if (!_model.pro_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_nameValidationFailureMessages);
        }
        if (!_model.part_numberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_part_numberValidationFailureMessages);
        }
        if (!_model.delivery_order_dateIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_delivery_order_dateValidationFailureMessages);
        }
        if (!_model.pro_descriptionIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_descriptionValidationFailureMessages);
        }
        if (!_model.do_remarksIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_do_remarksValidationFailureMessages);
        }
        if (!_model.sc_detserialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sc_detserialnumber_fkValidationFailureMessages);
        }
        if (!_model.client_nameIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_client_nameValidationFailureMessages);
        }
        if (!_model.po_detserialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_po_detserialnumberValidationFailureMessages);
        }
        if (!_model.cre_datetimeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_cre_datetimeValidationFailureMessages);
        }
        if (!_model.sc_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sc_qtyValidationFailureMessages);
        }
        if (!_model.sc_serialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sc_serialnumberValidationFailureMessages);
        }
        if (!_model.pro_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_pro_serialnumber_fkValidationFailureMessages);
        }
        if (!_model.delivered_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_delivered_qtyValidationFailureMessages);
        }
        if (!_model.reserved_qtyIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_reserved_qtyValidationFailureMessages);
        }
        if (!_model.delivery_order_codeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_delivery_order_codeValidationFailureMessages);
        }
        if (!_model.do_detserialnumberIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_do_detserialnumberValidationFailureMessages);
        }
        if (!_model.sales_con_codeIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_sales_con_codeValidationFailureMessages);
        }
        if (!_model.delivery_order_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_delivery_order_fkValidationFailureMessages);
        }
        if (!_model.warehouse_serialnumber_fkIsValid)
        {
            propertyValidity = false;
            com.adobe.fiber.util.FiberUtils.arrayAdd(validationFailureMessages, _model.model_internal::_warehouse_serialnumber_fkValidationFailureMessages);
        }

        model_internal::_cacheInitialized_isValid = true;
        model_internal::invalidConstraints_der = violatedConsts;
        model_internal::validationFailureMessages_der = validationFailureMessages;
        return violatedConsts.length == 0 && propertyValidity;
    }

    /**
     * derived property setters
     */

    model_internal function set isValid_der(value:Boolean) : void
    {
        var oldValue:Boolean = model_internal::_isValid;
        if (oldValue !== value)
        {
            model_internal::_isValid = value;
            _model.model_internal::fireChangeEvent("isValid", oldValue, model_internal::_isValid);
        }
    }

    /**
     * derived property getters
     */

    [Transient]
    [Bindable(event="propertyChange")]
    public function get _model() : _VoDeliveryOrderEntityMetadata
    {
        return model_internal::_dminternal_model;
    }

    public function set _model(value : _VoDeliveryOrderEntityMetadata) : void
    {
        var oldValue : _VoDeliveryOrderEntityMetadata = model_internal::_dminternal_model;
        if (oldValue !== value)
        {
            model_internal::_dminternal_model = value;
            this.dispatchEvent(mx.events.PropertyChangeEvent.createUpdateEvent(this, "_model", oldValue, model_internal::_dminternal_model));
        }
    }

    /**
     * methods
     */


    /**
     *  services
     */
    private var _managingService:com.adobe.fiber.services.IFiberManagingService;

    public function set managingService(managingService:com.adobe.fiber.services.IFiberManagingService):void
    {
        _managingService = managingService;
    }

    model_internal function set invalidConstraints_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_invalidConstraints;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_invalidConstraints = value;
            _model.model_internal::fireChangeEvent("invalidConstraints", oldValue, model_internal::_invalidConstraints);
        }
    }

    model_internal function set validationFailureMessages_der(value:Array) : void
    {
        var oldValue:Array = model_internal::_validationFailureMessages;
        // avoid firing the event when old and new value are different empty arrays
        if (oldValue !== value && (oldValue.length > 0 || value.length > 0))
        {
            model_internal::_validationFailureMessages = value;
            _model.model_internal::fireChangeEvent("validationFailureMessages", oldValue, model_internal::_validationFailureMessages);
        }
    }

    model_internal var _doValidationCacheOfPro_name : Array = null;
    model_internal var _doValidationLastValOfPro_name : ArrayCollection;

    model_internal function _doValidationForPro_name(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_name != null && model_internal::_doValidationLastValOfPro_name == value)
           return model_internal::_doValidationCacheOfPro_name ;

        _model.model_internal::_pro_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_nameAvailable && _internal_pro_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_name is required"));
        }

        model_internal::_doValidationCacheOfPro_name = validationFailures;
        model_internal::_doValidationLastValOfPro_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPart_number : Array = null;
    model_internal var _doValidationLastValOfPart_number : ArrayCollection;

    model_internal function _doValidationForPart_number(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPart_number != null && model_internal::_doValidationLastValOfPart_number == value)
           return model_internal::_doValidationCacheOfPart_number ;

        _model.model_internal::_part_numberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPart_numberAvailable && _internal_part_number == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "part_number is required"));
        }

        model_internal::_doValidationCacheOfPart_number = validationFailures;
        model_internal::_doValidationLastValOfPart_number = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDelivery_order_date : Array = null;
    model_internal var _doValidationLastValOfDelivery_order_date : String;

    model_internal function _doValidationForDelivery_order_date(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfDelivery_order_date != null && model_internal::_doValidationLastValOfDelivery_order_date == value)
           return model_internal::_doValidationCacheOfDelivery_order_date ;

        _model.model_internal::_delivery_order_dateIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDelivery_order_dateAvailable && _internal_delivery_order_date == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "delivery_order_date is required"));
        }

        model_internal::_doValidationCacheOfDelivery_order_date = validationFailures;
        model_internal::_doValidationLastValOfDelivery_order_date = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_description : Array = null;
    model_internal var _doValidationLastValOfPro_description : ArrayCollection;

    model_internal function _doValidationForPro_description(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_description != null && model_internal::_doValidationLastValOfPro_description == value)
           return model_internal::_doValidationCacheOfPro_description ;

        _model.model_internal::_pro_descriptionIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_descriptionAvailable && _internal_pro_description == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_description is required"));
        }

        model_internal::_doValidationCacheOfPro_description = validationFailures;
        model_internal::_doValidationLastValOfPro_description = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDo_remarks : Array = null;
    model_internal var _doValidationLastValOfDo_remarks : String;

    model_internal function _doValidationForDo_remarks(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfDo_remarks != null && model_internal::_doValidationLastValOfDo_remarks == value)
           return model_internal::_doValidationCacheOfDo_remarks ;

        _model.model_internal::_do_remarksIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDo_remarksAvailable && _internal_do_remarks == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "do_remarks is required"));
        }

        model_internal::_doValidationCacheOfDo_remarks = validationFailures;
        model_internal::_doValidationLastValOfDo_remarks = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSc_detserialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfSc_detserialnumber_fk : ArrayCollection;

    model_internal function _doValidationForSc_detserialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSc_detserialnumber_fk != null && model_internal::_doValidationLastValOfSc_detserialnumber_fk == value)
           return model_internal::_doValidationCacheOfSc_detserialnumber_fk ;

        _model.model_internal::_sc_detserialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSc_detserialnumber_fkAvailable && _internal_sc_detserialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sc_detserialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfSc_detserialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfSc_detserialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfClient_name : Array = null;
    model_internal var _doValidationLastValOfClient_name : String;

    model_internal function _doValidationForClient_name(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfClient_name != null && model_internal::_doValidationLastValOfClient_name == value)
           return model_internal::_doValidationCacheOfClient_name ;

        _model.model_internal::_client_nameIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isClient_nameAvailable && _internal_client_name == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "client_name is required"));
        }

        model_internal::_doValidationCacheOfClient_name = validationFailures;
        model_internal::_doValidationLastValOfClient_name = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPo_detserialnumber : Array = null;
    model_internal var _doValidationLastValOfPo_detserialnumber : ArrayCollection;

    model_internal function _doValidationForPo_detserialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPo_detserialnumber != null && model_internal::_doValidationLastValOfPo_detserialnumber == value)
           return model_internal::_doValidationCacheOfPo_detserialnumber ;

        _model.model_internal::_po_detserialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPo_detserialnumberAvailable && _internal_po_detserialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "po_detserialnumber is required"));
        }

        model_internal::_doValidationCacheOfPo_detserialnumber = validationFailures;
        model_internal::_doValidationLastValOfPo_detserialnumber = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfCre_datetime : Array = null;
    model_internal var _doValidationLastValOfCre_datetime : String;

    model_internal function _doValidationForCre_datetime(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfCre_datetime != null && model_internal::_doValidationLastValOfCre_datetime == value)
           return model_internal::_doValidationCacheOfCre_datetime ;

        _model.model_internal::_cre_datetimeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isCre_datetimeAvailable && _internal_cre_datetime == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "cre_datetime is required"));
        }

        model_internal::_doValidationCacheOfCre_datetime = validationFailures;
        model_internal::_doValidationLastValOfCre_datetime = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSc_qty : Array = null;
    model_internal var _doValidationLastValOfSc_qty : ArrayCollection;

    model_internal function _doValidationForSc_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSc_qty != null && model_internal::_doValidationLastValOfSc_qty == value)
           return model_internal::_doValidationCacheOfSc_qty ;

        _model.model_internal::_sc_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSc_qtyAvailable && _internal_sc_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sc_qty is required"));
        }

        model_internal::_doValidationCacheOfSc_qty = validationFailures;
        model_internal::_doValidationLastValOfSc_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSc_serialnumber : Array = null;
    model_internal var _doValidationLastValOfSc_serialnumber : ArrayCollection;

    model_internal function _doValidationForSc_serialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSc_serialnumber != null && model_internal::_doValidationLastValOfSc_serialnumber == value)
           return model_internal::_doValidationCacheOfSc_serialnumber ;

        _model.model_internal::_sc_serialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSc_serialnumberAvailable && _internal_sc_serialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sc_serialnumber is required"));
        }

        model_internal::_doValidationCacheOfSc_serialnumber = validationFailures;
        model_internal::_doValidationLastValOfSc_serialnumber = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfPro_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfPro_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForPro_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfPro_serialnumber_fk != null && model_internal::_doValidationLastValOfPro_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfPro_serialnumber_fk ;

        _model.model_internal::_pro_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isPro_serialnumber_fkAvailable && _internal_pro_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "pro_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfPro_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfPro_serialnumber_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDelivered_qty : Array = null;
    model_internal var _doValidationLastValOfDelivered_qty : ArrayCollection;

    model_internal function _doValidationForDelivered_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfDelivered_qty != null && model_internal::_doValidationLastValOfDelivered_qty == value)
           return model_internal::_doValidationCacheOfDelivered_qty ;

        _model.model_internal::_delivered_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDelivered_qtyAvailable && _internal_delivered_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "delivered_qty is required"));
        }

        model_internal::_doValidationCacheOfDelivered_qty = validationFailures;
        model_internal::_doValidationLastValOfDelivered_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfReserved_qty : Array = null;
    model_internal var _doValidationLastValOfReserved_qty : ArrayCollection;

    model_internal function _doValidationForReserved_qty(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfReserved_qty != null && model_internal::_doValidationLastValOfReserved_qty == value)
           return model_internal::_doValidationCacheOfReserved_qty ;

        _model.model_internal::_reserved_qtyIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isReserved_qtyAvailable && _internal_reserved_qty == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "reserved_qty is required"));
        }

        model_internal::_doValidationCacheOfReserved_qty = validationFailures;
        model_internal::_doValidationLastValOfReserved_qty = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDelivery_order_code : Array = null;
    model_internal var _doValidationLastValOfDelivery_order_code : String;

    model_internal function _doValidationForDelivery_order_code(valueIn:Object):Array
    {
        var value : String = valueIn as String;

        if (model_internal::_doValidationCacheOfDelivery_order_code != null && model_internal::_doValidationLastValOfDelivery_order_code == value)
           return model_internal::_doValidationCacheOfDelivery_order_code ;

        _model.model_internal::_delivery_order_codeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDelivery_order_codeAvailable && _internal_delivery_order_code == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "delivery_order_code is required"));
        }

        model_internal::_doValidationCacheOfDelivery_order_code = validationFailures;
        model_internal::_doValidationLastValOfDelivery_order_code = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDo_detserialnumber : Array = null;
    model_internal var _doValidationLastValOfDo_detserialnumber : ArrayCollection;

    model_internal function _doValidationForDo_detserialnumber(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfDo_detserialnumber != null && model_internal::_doValidationLastValOfDo_detserialnumber == value)
           return model_internal::_doValidationCacheOfDo_detserialnumber ;

        _model.model_internal::_do_detserialnumberIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDo_detserialnumberAvailable && _internal_do_detserialnumber == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "do_detserialnumber is required"));
        }

        model_internal::_doValidationCacheOfDo_detserialnumber = validationFailures;
        model_internal::_doValidationLastValOfDo_detserialnumber = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfSales_con_code : Array = null;
    model_internal var _doValidationLastValOfSales_con_code : ArrayCollection;

    model_internal function _doValidationForSales_con_code(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfSales_con_code != null && model_internal::_doValidationLastValOfSales_con_code == value)
           return model_internal::_doValidationCacheOfSales_con_code ;

        _model.model_internal::_sales_con_codeIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isSales_con_codeAvailable && _internal_sales_con_code == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "sales_con_code is required"));
        }

        model_internal::_doValidationCacheOfSales_con_code = validationFailures;
        model_internal::_doValidationLastValOfSales_con_code = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfDelivery_order_fk : Array = null;
    model_internal var _doValidationLastValOfDelivery_order_fk : ArrayCollection;

    model_internal function _doValidationForDelivery_order_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfDelivery_order_fk != null && model_internal::_doValidationLastValOfDelivery_order_fk == value)
           return model_internal::_doValidationCacheOfDelivery_order_fk ;

        _model.model_internal::_delivery_order_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isDelivery_order_fkAvailable && _internal_delivery_order_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "delivery_order_fk is required"));
        }

        model_internal::_doValidationCacheOfDelivery_order_fk = validationFailures;
        model_internal::_doValidationLastValOfDelivery_order_fk = value;

        return validationFailures;
    }
    
    model_internal var _doValidationCacheOfWarehouse_serialnumber_fk : Array = null;
    model_internal var _doValidationLastValOfWarehouse_serialnumber_fk : ArrayCollection;

    model_internal function _doValidationForWarehouse_serialnumber_fk(valueIn:Object):Array
    {
        var value : ArrayCollection = valueIn as ArrayCollection;

        if (model_internal::_doValidationCacheOfWarehouse_serialnumber_fk != null && model_internal::_doValidationLastValOfWarehouse_serialnumber_fk == value)
           return model_internal::_doValidationCacheOfWarehouse_serialnumber_fk ;

        _model.model_internal::_warehouse_serialnumber_fkIsValidCacheInitialized = true;
        var validationFailures:Array = new Array();
        var errorMessage:String;
        var failure:Boolean;

        var valRes:ValidationResult;
        if (_model.isWarehouse_serialnumber_fkAvailable && _internal_warehouse_serialnumber_fk == null)
        {
            validationFailures.push(new ValidationResult(true, "", "", "warehouse_serialnumber_fk is required"));
        }

        model_internal::_doValidationCacheOfWarehouse_serialnumber_fk = validationFailures;
        model_internal::_doValidationLastValOfWarehouse_serialnumber_fk = value;

        return validationFailures;
    }
    

}

}
